<template>
  <div class="aside_box">
    <div class="item_box flex_Level_VerticalCenter" :class="{ active: item.code == menu.asideActive }" v-for="(item, index) in menu.asideList" :key="index" @click="router.push(item.path)">
      <span class="iconfont icon-shouye1"></span>
      <div class="title">{{ item.text }}</div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { menuStore } from '@/store'
import { useRouter } from 'vue-router'
const menu = menuStore()
const router = useRouter()
</script>

<style scoped lang="scss">
.aside_box {
  width: 100%;
  height: 100%;
  color: #555555;

  .item_box {
    height: 48px;
    padding: 0 14px;
    border-radius: 10px;

    &:hover {
      color: $color;
      cursor: pointer;
    }

    .iconfont {
      width: 20px;
      font-weight: bold;
      font-size: 18px;
      transition: all 0.5s;
    }

    .title {
      flex: 1;
      padding-left: 10px;
    }
  }

  .active {
    background-color: rgba($color: $color, $alpha: 0.2);
    color: $color;
  }
}
</style>
